package com.zzxy.spring12.factory;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

public class MyBeanPostProcessor implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object o, String s) throws BeansException {          //先处理BEAN
        System.out.println("5.如果存在类实现 BeanPostProcessor（后处理Bean） ，执行postProcessBeforeInitialization"+s);
        return o;
    }

    @Override
    public Object postProcessAfterInitialization(Object o, String s) throws BeansException {        //后处理BEAN
        System.out.println(" 8.如果存在类实现 BeanPostProcessor（处理Bean） ，执行postProcessAfterInitialization执行业务处理");
        return o;
    }
}
